import {createRouter, createWebHistory} from 'vue-router';

let router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/erpLogin',
    },
    {
      path: '/erpLogin',
      component: () => import('../views/erpLogin.vue'),
    },
    {
      path: '/login',
      component: () => import('../views/Login.vue'),
    },
    {
      path: '/erpLogin',
      component: () => import('../views/erpLogin.vue'),
    },
    {
      path: '/PDF_preview',
      component: () => import('../views/PDF_preview.vue'),
    },
    {
      meta: {title: '客服与售后'},
      path: '/Service',
      component: () => import('../views/Home.vue'),
      redirect: '/Service/call_center',
      children: [
        {
          meta: {title: '客服管理'},
          path: '/Service/Service_Management',
          component: () => import('../views/plateform/Service/Service_Management.vue'),
        },
        {
          meta: {title: '客服中心'},
          path: '/Service/call_center',
          component: () => import('../views/plateform/Service/call_center.vue'),
        },
        {
          meta: {title: '拖车申述'},
          path: '/Service/Trailer_explain',
          component: () =>
            import('../views/plateform/Service/Trailer_explain.vue'),
        },
        {
          meta: {title: '商城申述'},
          path: '/Service/Shop_Appeal',
          component: () => import('../views/plateform/Service/Shop_Appeal.vue'),
        },
        {
          meta: {title: '收车投诉'},
          path: '/Service/CarComplaint',
          component: () =>
            import('../views/plateform/Service/Car_Complaint.vue'),
        },
        {
          meta: {title: '商城意见反馈'},
          path: '/Service/Feedback',
          component: () => import('../views/plateform/Service/Feedback.vue'),
        },
        {
          meta: {title: '商城投诉'},
          path: '/Service/ShopComplaint',
          component: () =>
            import('../views/plateform/Service/Shop_Complaint.vue'),
        },
        {
          meta: {title: '分配拖车公司'},
          path: '/Service/Allocate_Trailer',
          component: () =>
            import('../views/plateform/Service/Allocate_Trailer.vue'),
        },
      ],
    },
    {
      meta: {title: '财务管理'},
      path: '/Finance',
      component: () => import('../views/Home.vue'),
      redirect: '/Finance/Finance_settleDetail',
      children: [
        {
          meta: {title: '结算明细'},
          path: '/Finance/Finance_settleDetail',
          component: () =>
            import('../views/plateform/Finance/Finance_settleDetail.vue'),
        },
        {
          meta: {title: '识别明细'},
          path: '/Finance/Finance_rechargeDetail',
          component: () =>
            import('../views/plateform/Finance/Finance_rechargeDetail.vue'),
        },
        {
          meta: {title: '账户充值'},
          path: '/Finance/Finance_recharge',
          component: () =>
            import('../views/plateform/Finance/Finance_recharge.vue'),
        },
        {
          meta: {title: '充值记录'},
          path: '/Finance/FinanceRecord_platform',
          component: () =>
            import('../views/plateform/Finance/FinanceRecord_platform.vue'),
        },
        {
          meta: {title: '结算单管理'},
          path: '/Finance/Finance_accounts',
          component: () =>
            import('../views/plateform/Finance/Finance_accounts.vue'),
        },
        {
          meta: {title: '物流结算'},
          path: '/Finance/LogisticsSettlement',
          component: () =>
            import('../views/plateform/Finance/Logistics_settlement.vue'),
        },
        {
          meta: {title: '物流结算明细'},
          path: '/Finance/LogisticsSettlementDetails',
          component: () =>
            import('../views/plateform/Finance/Logistics_settlement_details.vue'),
        },
        {
          meta: {title: '账户提现'},
          path: '/Finance/Finance_withdraw',
          component: () =>
            import('../views/plateform/Finance/Finance_withdraw.vue'),
        },
        {
          meta: {title: '提现记录'},
          path: '/Finance/Finance_wRecord',
          component: () =>
            import('../views/plateform/Finance/Finance_wRecord.vue'),
        },
        {
          meta: {title: '收车结算'},
          path: '/Finance/Finance_collection',
          component: () =>
            import('../views/plateform/Finance/Finance_collection.vue'),
        },
        {
          meta: {title: '公司账户记录'},
          path: '/Finance/Account_records',
          component: () =>
            import('../views/plateform/Finance/Account_records.vue'),
        },
        {
          meta: {title: '拖车结算'},
          path: '/Finance/Finance_trailer',
          component: () =>
            import('../views/plateform/Finance/Finance_trailer.vue'),
        },
        {
          meta: {title: '拖车订单'},
          path: '/Finance/Finance_order',
          component: () =>
            import('../views/plateform/Finance/Finance_order.vue'),
        },
        {
          meta: {title: '分账记录'},
          path: '/Finance/Finance_record',
          component: () =>
            import('../views/plateform/Finance/Finance_record.vue'),
        },
        {
          meta: {title: '分账发票'},
          path: '/Finance/Finance_invoice',
          component: () =>
            import('../views/plateform/Finance/Finance_invoice.vue'),
        },
        {
          meta: {title: '旌龙结算'},
          path: '/Finance/ThreeParty_Settlement',
          component: () =>
            import('../views/plateform/Finance/ThreeParty_Settlement.vue'),
        },
        {
          meta: {title: '收车款明细'},
          path: '/Finance/Finance_collectionDetails',
          component: () =>
              import('../views/plateform/Finance/Finance_collectionDetails.vue'),
        },
      ],
    },
    {
      meta: {title: '商户数据'},
      path: '/Platform',
      component: () => import('../views/Home.vue'),
      redirect: '/PlatformData/Overview',
      children: [
        {
          meta: {title: '用户管理'},
          path: '/PlatformData/UserManage',
          component: () =>
            import('../views/plateform/PlatformData/UserManage.vue'),
        },
        {
          meta: {title: '平台概况'},
          path: '/PlatformData/Overview',
          component: () =>
            import('../views/plateform/PlatformData/PlatformOverview.vue'),
        },
        {
          meta: {title: '商户消息管理'},
          path: '/PlatformData/InformationShop',
          component: () =>
            import('../views/plateform/PlatformData/InformationShop.vue'),
        },
        {
          meta: {title: '用户消息'},
          path: '/PlatformData/InformationPlateformUser',
          component: () =>
            import(
              '../views/plateform/PlatformData/InformationPlateform_user.vue'
            ),
        },
        {
          meta: {title: '商户订单'},
          path: '/PlatformData/merchantOrder',
          component: () =>
            import('../views/plateform/PlatformData/MerchantOrder.vue'),
        },
        {
          meta: {title: '商户售后'},
          path: '/PlatformData/merchantAftersale',
          component: () =>
            import('../views/plateform/PlatformData/MerchantAftersale.vue'),
        },
        {
          meta: {title: '商户商品'},
          path: '/PlatformData/merchantList',
          component: () =>
            import('../views/plateform/PlatformData/MerchantProduce.vue'),
        },
        {
          meta: {title: '商户店铺'},
          path: '/PlatformData/merchantManage',
          component: () =>
            import('../views/plateform/PlatformData/MerchantManage.vue'),
        },
        {
          meta: {title: '商户消息'},
          path: '/PlatformData/MerchantMessage',
          component: () =>
            import('../views/plateform/PlatformData/MerchantMessage.vue'),
        },
        {
          meta: {title: '广告管理'},
          path: '/PlatformData/Advertising',
          component: () =>
            import('../views/plateform/PlatformData/Advertising.vue'),
        },
      ],
    },
    {
      meta: {title: '系统管理'},
      path: '/System',
      component: () => import('../views/Home.vue'),
      redirect: '/System/System_setting',
      children: [
        {
          meta: {title: '文章管理'},
          path: '/System/Article',
          component: () => import('../views/plateform/System/Article.vue'),
        },
        {
          meta: {title: '功能集合分配'},
          path: '/System/System_role',
          component: () => import('../views/plateform/System/System_role.vue'),
        },
        {
          meta: {title: '委托书管理'},
          path: '/System/System_contracts',
          component: () =>
            import('../views/plateform/System/System_contracts.vue'),
        },
        {
          meta: {title: '子类型管辖关系'},
          path: '/System/System_child',
          component: () => import('../views/plateform/System/System_child.vue'),
        },
        {
          meta: {title: '操作日志管理'},
          path: '/System/System_conlog',
          component: () =>
            import('../views/plateform/System/System_conlog.vue'),
        },
        {
          meta: {title: '登录日志管理'},
          path: '/System/System_loginlog',
          component: () =>
            import('../views/plateform/System/System_loginlog.vue'),
        },
        {
          meta: {title: '定价列表'},
          path: '/System/System_rechargelist',
          component: () =>
            import('../views/plateform/System/System_rechargelist.vue'),
        },
        {
          meta: {title: '系统功能设置'},
          path: '/System/System_setting',
          component: () =>
            import('../views/plateform/System/System_setting.vue'),
        },
        {
          meta: {title: '协议管理'},
          path: '/System/System_agreement',
          component: () =>
            import('../views/plateform/System/System_agreement.vue'),
        },
        {
          meta: {title: '商家须知'},
          path: '/System/System_notice',
          component: () =>
            import('../views/plateform/System/System_notice.vue'),
        },
        {
          meta: {title: '支付认证'},
          path: '/System/System_payWarrant',
          component: () =>
            import('../views/plateform/System/System_payWarrant.vue'),
        },
        {
          meta: {title: '平台用户'},
          path: '/System/Platform_user',
          component: () =>
            import('../views/plateform/System/Platform_user.vue'),
        },
        {
          meta: {title: '收车异常处理'},
          path: '/System/CarAbnormal',
          component: () =>
            import(
              '../views/plateform/System/CarAbnormal.vue'
            ),
        },
      ],
    },
    {
      meta: {title: '组织架构'},
      path: '/Authority',
      redirect: '/Authority/Authority_company',
      component: () => import('../views/Home.vue'),
      children: [
        {
          meta: {title: '转运站'},
          path: '/Authority/Authority_network',
          component: () =>
            import('../views/plateform/Authority/Authority_network.vue'),
        },
        {
          meta: {title: '公司管理'},
          path: '/Authority/Authority_company',
          component: () =>
            import('../views/plateform/Authority/Authority_company.vue'),
        },
        {
          meta: {title: '部门管理'},
          path: '/Authority/Authority_section',
          component: () =>
            import('../views/plateform/Authority/Authority_section.vue'),
        },
        {
          meta: {title: '岗位设置'},
          path: '/Authority/Authority_position',
          component: () =>
            import('../views/plateform/Authority/Authority_position.vue'),
        },
        {
          meta: {title: '员工管理'},
          path: '/Authority/Authority_employee',
          component: () =>
            import('../views/plateform/Authority/Authority_employee.vue'),
        },
      ],
    },
    {
      meta: {title: '仓库管理'},
      path: '/Storage',
      component: () => import('../views/Home.vue'),
      redirect: '/Storage/Storage_carputin',
      children: [
        {
          meta: {title: '库存数据'},
          path: '/Storage/Storage_data',
          redirect: '/Storage/Storage_data/Storage_data',
          children: [
            {
              meta: {title: '原材料'},
              path: '/Storage/Storage_data/Storage_stockControl',
              component: () =>
                import(
                  '../views/plateform/Storage/Storage_data/Storage_stockControl.vue'
                ),
            },
            {
              meta: {title: '配件'},
              path: '/Storage/Storage_data/Storage_parts',
              component: () =>
                import(
                  '../views/plateform/Storage/Storage_data/Storage_parts.vue'
                ),
            },
            {
              meta: {title: '整车'},
              path: '/Storage/Storage_data/Storage_carputin',
              component: () =>
                import(
                  '../views/plateform/Storage/Storage_data/Storage_carputin.vue'
                ),
            },
            {
              meta: {title: '危固废'},
              path: '/Storage/Storage_data/Storage_unrecoverable',
              component: () =>
                import(
                  '../views/plateform/Storage/Storage_data/Storage_unrecoverable.vue'
                ),
            },
          ],
        },
        {
          meta: {title: '库存管理'},
          path: '/Storage/Storage_stockControl/Storage_stockControl',
          redirect: '/Storage/Storage_stockControl/Storage_stockControl',
          children: [
            {
              meta: {title: '出库详情'},
              path: '/Storage/Storage_stockControl/Storage_removal',
              component: () =>
                import(
                  '../views/plateform/Storage/Storage_stockControl/Storage_removal.vue'
                ),
            },
            {
              meta: {title: '入库详情'},
              path: '/Storage/Storage_stockControl/Storage_putIn',
              component: () =>
                import(
                  '../views/plateform/Storage/Storage_stockControl/Storage_putIn.vue'
                ),
            },
            {
              meta: {title: '调拨详情'},
              path: '/Storage/Storage_stockControl/Storage_allot',
              component: () =>
                import(
                  '../views/plateform/Storage/Storage_stockControl/Storage_allot.vue'
                ),
            },
          ],
        },
        {
          meta: {title: '仓库设置'},
          path: '/Storage/Storage_setup',
          redirect: '/Storage/Storage_setup/Storage_setup',
          children: [
            {
              meta: {title: '区域货架管理'},
              path: '/Storage/Storage_setup/Storage_racks',
              component: () =>
                import(
                  '../views/plateform/Storage/Storage_setup/Storage_racks.vue'
                ),
            },
            {
              meta: {title: '仓库管理'},
              path: '/Storage/Storage_setup/Storage_setup',
              component: () =>
                import(
                  '../views/plateform/Storage/Storage_setup/Storage_setup.vue'
                ),
            },
          ],
        },
        {
          meta: {title: '仓库盘存'},
          path: '/Storage/Storage_inventory',
          component: () =>
            import('../views/plateform/Storage/Storage_inventory.vue'),
        },
      ],
    },
    {
      meta: {title: '拆解厂数据'},
      path: '/Home',
      component: () => import('../views/Home.vue'),
      redirect: '/Home/Home',
      children: [
        {
          meta: {title: '原材料统计'},
          path: '/Home/materialScreen',
          component: () => import('../views/plateform/Home/materialScreen.vue'),
        },
        {
          meta: { title: '平台收车统计' },
          path: '/Home/factoryData',
          component: () => import('../views/plateform/Home/factoryData.vue'),
        },
        {
          meta: {title: '危固废统计'},
          path: '/Home/wasteScreen',
          component: () => import('../views/plateform/Home/wasteScreen.vue'),
        },
        {
          meta: {title: '配件统计'},
          path: '/Home/partsScreen',
          component: () => import('../views/plateform/Home/partsScreen.vue'),
        },
        {
          meta: {title: '报废车统计'},
          path: '/Home/scrapCarScreen',
          component: () => import('../views/plateform/Home/scrapCarScreen.vue'),
        },
        {
          meta: {title: '概况'},
          path: '/Home/Home',
          component: () => import('../views/plateform/Home/Home.vue'),
        },
      ],
    },
    {
      meta: {title: '欢迎页'},
      path: '/WelcomePage',
      component: () => import('../views/Home.vue'),
      redirect: '/WelcomePage/home',
      children: [
        {
          meta: {title: '欢迎'},
          path: '/WelcomePage/home',
          component: () => import('../views/plateform/WelcomePage/home.vue'),
        },
      ],
    },
    {
      meta: {title: '商城后台管理'},
      path: '/Shop',
      component: () => import('../views/Home.vue'),
      redirect: '/Shop/Manage',
      children: [
        {
          meta: {title: '商品管理'},
          path: '/shop/goodsManage',
          redirect: '/shop/manage/goodsList',
          children: [
            {
              meta: {title: '商品评价'},
              path: '/shop/manage/evaluate',
              component: () =>
                import('../views/plateform/Shop/Goods/GoodsEvaluate.vue'),
            },
            {
              meta: {title: '内容编辑上传'},
              path: '/shop/manage/GoodsEdit',
              component: () =>
                import('../views/plateform/Shop/Goods/GoodsEdit.vue'),
            },
            {
              meta: {title: '商品列表'},
              path: '/shop/manage/goodsList',
              component: () =>
                import('../views/plateform/Shop/Goods/GoodsManage.vue'),
            },
          ],
        },
        {
          meta: {title: '商城首页'},
          path: '/Shop/MallHome',
          component: () => import('../views/plateform/Shop/MallHome.vue'),
        },
        {
          meta: {title: '投诉列表'},
          path: '/Shop/ComplaintList',
          component: () => import('../views/plateform/Shop/ComplaintList.vue'),
        },
        {
          meta: {title: '申诉列表'},
          path: '/Shop/AppealList',
          component: () => import('../views/plateform/Shop/AppealList.vue'),
        },
        {
          meta: {title: '消息管理'},
          path: '/Shop/Information',
          redirect: '/Shop/Information/InformationPlateformUser',
          children: [
            {
              meta: {title: '消息通知'},
              path: '/Shop/Information/messageNotification',
              component: () =>
                import(
                  '../views/plateform/Shop/Information/messageNotification.vue'
                ),
            },
            {
              meta: {title: '用户消息管理'},
              path: '/Shop/Information/InformationPlateformUser',
              component: () =>
                import(
                  '../views/plateform/Shop/Information/InformationPlateform_user.vue'
                ),
            },
          ],
        },
        {
          meta: {title: '订单管理'},
          path: '/store/orderManage',
          redirect: '/store/orderManage',
          children: [
            {
              meta: {title: '订单列表'},
              path: '/store/orderManage',
              component: () =>
                import('../views/plateform/Shop/Order/OrderList.vue'),
            },
            {
              meta: {title: '售后管理'},
              path: '/store/orderManage/orderAftersale',
              component: () =>
                import('../views/plateform/Shop/Order/Aftersale.vue'),
            },
            {
              meta: {title: '发票列表'},
              path: '/store/orderManage/invoiceList',
              component: () =>
                import('../views/plateform/Shop/Order/InvoiceList.vue'),
            },
          ],
        },
        {
          meta: {title: '商品分组'},
          path: '/store/shopGroup',
          component: () => import('../views/plateform/Shop/ShopGroup.vue'),
        },
        {
          meta: {title: '素材管理'},
          path: '/store/material',
          component: () => import('../views/plateform/Shop/Material.vue'),
        },
        {
          meta: {title: '投诉处理'},
          path: '/store/complaint',
          component: () => import('../views/plateform/Shop/Complaint.vue'),
        },
        {
          meta: {title: '店铺信息'},
          path: '/store/openstoreManage',
          component: () => import('../views/plateform/Shop/OpenStore.vue'),
        },
        {
          meta: {title: '商家客服'},
          path: '/store/call_center',
          component: () => import('../views/plateform/Shop/call_center.vue'),
        },
        {
          meta: {title: '商户管理设置'},
          path: '/Shop/ShopSetup',
          redirect: '/Shop/ShopSetup/TransactionSetup',
          children: [
            {
              meta: {title: '交易设置'},
              path: '/Shop/ShopSetup/TransactionSetup',
              component: () =>
                import(
                  '../views/plateform/Shop/ShopSetup/Transaction_setting.vue'
                ),
            },
          ],
        },
        {
          meta: {title: '关注列表'},
          path: '/shop/InterestList',
          component: () => import('../views/plateform/Shop/InterestList.vue'),
        },
      ],
    },
    {
      meta: {title: '数据设置'},
      path: '/Manufacturer',
      component: () => import('../views/Home.vue'),

      redirect: '/Manufacturer/Valuation',
      children: [
        {
          meta: {title: '消息模板'},
          path: '/Manufacturer/messageTemplate',
          component: () =>
            import(
              '../views/plateform/ManufacturerSetting/messageTemplate.vue'
            ),
        },
        {
          meta: {title: '缺件扣款'},
          path: '/Manufacturer/MissingPartsSetting',
          component: () =>
            import(
              '../views/plateform/ManufacturerSetting/MissingPartsSetting.vue'
            ),
        },
        {
          meta: {title: '估价管理'},
          path: '/Manufacturer/Valuation',
          component: () =>
            import(
              '../views/plateform/ManufacturerSetting/ValuationSetting.vue'
            ),
        },
        {
          meta: {title: '扫描定价'},
          path: '/Manufacturer/System_recharge',
          component: () =>
            import(
              '../views/plateform/ManufacturerSetting/System_recharge.vue'
            ),
        },
        {
          meta: {title: '回收指导价'},
          path: '/Manufacturer/System_guidePrice',
          component: () =>
            import(
              '../views/plateform/ManufacturerSetting/System_guidePrice.vue'
            ),
        },
        {
          meta: {title: '订单设置'},
          path: '/Manufacturer/OrderSetup',
          component: () =>
            import('../views/plateform/ManufacturerSetting/OrderSetup.vue'),
        },
        {
          meta: {title: '平台估价管理'},
          path: '/Manufacturer/ValuationManagement',
          component: () =>
            import(
              '../views/plateform/ManufacturerSetting/ValuationManagement.vue'
            ),
        },
      ],
    },
    {
      meta: {title: '拖车管理'},
      path: '/Trailer',
      component: () => import('../views/Home.vue'),
      redirect: '/Trailer/Trailer_trailer',
      children: [
        {
          meta: {title: '抢单管理'},
          path: '/Trailer/Trailer_rushOrder',
          component: () =>
            import('../views/plateform/Trailer/Trailer_rushOrder.vue'),
        },
        {
          meta: {title: '拖车车辆管理'},
          path: '/Trailer/Trailer_trailer',
          component: () =>
            import('../views/plateform/Trailer/Trailer_trailer.vue'),
        },
        {
          meta: {title: '司机管理'},
          path: '/Trailer/Trailer_driver',
          component: () =>
            import('../views/plateform/Trailer/Trailer_driver.vue'),
        },
        {
          meta: {title: '预约管理'},
          path: '/Trailer/Trailer_reservation',
          component: () =>
            import('../views/plateform/Trailer/Trailer_reservation.vue'),
        },
        {
          meta: {title: '平台拖车工单'},
          path: '/Trailer/Trailer_workorder',
          component: () =>
            import('../views/plateform/Trailer/Trailer_workorder.vue'),
        },
        {
          meta: {title: '拖车距离设置'},
          path: '/Trailer/Trailer_distance',
          component: () =>
            import('../views/plateform/Trailer/Trailer_distance.vue'),
        },
      ],
    },
    {
      meta: {title: '办证大厅'},
      path: '/Certificate',
      redirect: '/Certificate/Certificate_cancel',
      component: () => import('../views/Home.vue'),
      children: [
        {
          meta: {title: '信息上传(商务部)'},
          path: '/Certificate/Certificate_certificate',
          component: () =>
            import(
              '../views/plateform/Certificate/Certificate_certificate.vue'
            ),
        },
        {
          meta: {title: '上传两证'},
          path: '/Certificate/Certificate_cancel',
          component: () =>
            import('../views/plateform/Certificate/Certificate_cancel.vue'),
        },
        {
          meta: {title: '资料下载'},
          path: '/Certificate/Certificate_dataDownload',
          component: () =>
            import(
              '../views/plateform/Certificate/Certificate_dataDownload.vue'
            ),
        },
      ],
    },
    {
      meta: {title: '审核管理'},
      path: '/Audit',
      component: () => import('../views/Home.vue'),
      redirect: '/Audit/Audit_setting',
      children: [
        {
          meta: {title: '流程设置'},
          path: '/Audit/Audit_setting',
          component: () => import('../views/plateform/Audit/Audit_setting.vue'),
        },
        {
          meta: {title: '估价审核'},
          path: '/Audit/Audit_evaluate',
          component: () =>
            import('../views/plateform/Audit/Audit_evaluate.vue'),
        },
        {
          meta: {title: '公司审核'},
          path: '/Audit/Authority_CompanyAudit',
          component: () =>
            import('../views/plateform/Audit/Authority_CompanyAudit.vue'),
        },
        {
          meta: {title: '审核列表'},
          path: '/Audit/Audit_list',
          component: () => import('../views/plateform/Audit/Audit_list.vue'),
        },
        {
          meta: {title: '商家认证审核'},
          path: '/Audit/Audit_merchant',
          component: () =>
            import('../views/plateform/Audit/Audit_merchant.vue'),
        },
      ],
    },
    {
      meta: {title: '监销管理'},
      path: '/Supervise',
      redirect: '/Supervise/Supervise_supervision',
      component: () => import('../views/Home.vue'),
      children: [
        {
          meta: {title: '车辆监销'},
          path: '/Supervise/Supervise_supervision',
          component: () =>
            import('../views/plateform/Supervise/Supervise_supervision.vue'),
        },
      ],
    },
    {
      meta: {title: '营销管理'},
      path: '/Market',
      redirect: '/Market/DistributionManagement',
      component: () => import('../views/Home.vue'),
      children: [
        {
          meta: {title: '分销管理'},
          path: '/Market/DistributionManagement',
          component: () =>
            import('../views/plateform/Market/DistributionManagement.vue'),
        },
        {
          meta: {title: '团队奖'},
          path: '/Market/TeamRewards',
          component: () =>
            import('../views/plateform/Market/TeamRewards.vue'),
        },
        {
          meta: {title: '优惠券管理'},
          path: '/Market/CouponManagement',
          component: () =>
            import('../views/plateform/Market/CouponManagement.vue'),
        },
        {
          meta: {title: '厂家档次设置'},
          path: '/Market/Market_level',
          component: () => import('../views/plateform/Market/Market_level.vue'),
        },
        {
          meta: {title: '积分管理'},
          path: '/Market/Point',
          redirect: '/Market/Point/Point_provide',
          children: [
            {
              meta: {title: '积分发放'},
              path: '/Market/Point/Point_provide',
              component: () =>
                import('../views/plateform/Market/Point/Point_provide.vue'),
            },
            {
              meta: {title: '积分兑换管理'},
              path: '/Market/Point/Point_Exmanage',
              component: () =>
                import('../views/plateform/Market/Point/Point_Exmanage.vue'),
            },
            {
              meta: {title: '积分兑换'},
              path: '/Market/Point/Point_exchange',
              component: () =>
                import('../views/plateform/Market/Point/Point_exchange.vue'),
            },
            {
              meta: {title: '平台活动管理'},
              path: '/Market/Point/PlatformManage',
              component: () =>
                import('../views/plateform/Market/Point/PlatformManage.vue'),
            },
            {
              meta: {title: '商家活动管理'},
              path: '/Market/Point/MeichantManage',
              component: () =>
                import('../views/plateform/Market/Point/MeichantManage.vue'),
            },
            {
              meta: {title: '平台活动创建'},
              path: '/Market/Point/PlatformActivityCreate',
              component: () =>
                import(
                  '../views/plateform/Market/Point/PlatformActivityCreate.vue'
                ),
            },
          ],
        },
      ],
    },
  ],
});
// function createNewTree(tree, parentLevel = 0) {
//   return tree.map((item) => {
//     let menuItem = {};
//     menuItem.path = item["uri"];
//     let tempName = item["name"];
//     let titleIndex = tempName.indexOf("title");
//     let titleEnd = tempName.length - 3;
//     if (titleIndex != -1) {
//       tempName = tempName.substring(titleIndex + 8, titleEnd);
//     }
//     menuItem.meta = { title: tempName };
//     menuItem.redirect = item["redirect"];

//     let tempUrl = item["fileUrl"];
//     let begin = tempUrl.indexOf("import");
//     let end = tempUrl.length - 2;
//     if (begin != -1) {
//       tempUrl = ".." + tempUrl.substring(begin + 12, end);
//     }
//     if (tempUrl) {
//       menuItem.component = function () {
//         // debugger
//         return import(tempUrl);
//       };
//     }

//     return {
//       ...menuItem,
//       level: parentLevel + 1,
//       children: createNewTree(item.children || [], parentLevel + 1),
//     };
//   });
// }
//从本地存储里面读出数据库里面的登录菜单数据
// if (localStorage.hasOwnProperty("roleRoutes")) {
//   let arrNewTree = createNewTree(
//     JSON.parse(localStorage.getItem("roleRoutes"))
//   );
//   console.log("arrNewTree", arrNewTree);
//   // console.log('根据后台数据生成的菜单==>>', arrNewTree)
//   let addItemToRoute = (tree) => {
//     tree.forEach((item) => {
//       router.addRoute(item);
//       if (item.children) {
//         addItemToRoute(item.children);
//       }
//     });
//   };
//   addItemToRoute(arrNewTree);
// }
router.addRoute({
  path: '/404',
  component: () => import('../views/plateform/error/404.vue'),
});
router.addRoute({
  path: '/largeScreen',
  component: () => import('../views/plateform/Home/largeScreen.vue'),
});
router.addRoute({
  path: '/:pathMatch(.*)*',
  redirect: '/404',
});
export default router;
